Skip to content

fix(ai): add missing OpenAI and Google service tiers - #53753

Merged
rekram1-node merged 1 commit into
v2from
ai-service-tier-forward-compat
Oct 7, 2026
Merged

rekram1-node merged 1 commit into
v2from
ai-service-tier-forward-compat

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Service tiers in @opencode/ai were already forward compatible: every pass-through tier is typed Known | (string & {}) and accepts any string at runtime, so unknown tiers are lowered unchanged. The known lists were stale, though, so newer tiers were missing from autocomplete.

  • OpenAI: add fast and ultrafast, matching the official SDK's ServiceTier (auto | default | flex | scale | priority | fast | ultrafast).
  • Google Interactions: add deferred, matching @google/genai's Interactions service_tier.
  • Anthropic (auto | standard_only), Gemini generateContent (standard | flex | priority), Groq and Vercel AI Gateway already match their current upstream SDK types.

The OpenAI Responses test now asserts scale, ultrafast, and an unknown future-tier all pass through as service_tier.

Context: #53538 is a V1 report where the bundled @ai-sdk/openai rejects ultrafast; this PR does not change V1.

Requested by: @rekram1-node (Aiden Cline via Slack)

@rekram1-node
rekram1-node merged commit 8bd8960 into v2 Oct 7, 2026
11 checks passed
@rekram1-node
rekram1-node deleted the ai-service-tier-forward-compat branch October 7, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant